package com.scy.java.object.inner;

public class Test {//外部类
    public class InnerClass{//内部类
        public int getSum(int x, int y){
            return x+y;
        }


    }
    public static void main(String[] args) {
        //外部类名 变量1 = new 外部类();
        //外部类名。非静态内部类名变量2 = 变1.new 非静态内部类名();
        Test.InnerClass ti = new Test().new InnerClass();
        int sum = ti.getSum(3, 4);
        System.out.println(sum);
    }
}
